package com.xuexiang.xui_lib.component.status;

import ohos.agp.components.Component;
import ohos.agp.utils.Color;

import java.io.Serializable;

public class CustomStateOptions implements Serializable {

    private int imageMediaRes;
    private boolean isLoading;
    private String message;
    private String buttonText;
    private Color progressColor;
    private Component.ClickedListener buttonClickListener;

    public CustomStateOptions image(int resId) {
        imageMediaRes = resId;
        return this;
    }

    public CustomStateOptions loading() {
        isLoading = true;
        return this;
    }

    public CustomStateOptions message(String val) {
        message = val;
        return this;
    }

    public CustomStateOptions buttonText(String val) {
        buttonText = val;
        return this;
    }

    public CustomStateOptions buttonClickListener(Component.ClickedListener val) {
        buttonClickListener = val;
        return this;
    }

    public int getImageMediaRes() {
        return imageMediaRes;
    }

    public Color getProgressColor() {
        return progressColor;
    }

    public CustomStateOptions progressColor(Color color) {
        this.progressColor = color;
        return this;
    }

    public boolean isLoading() {
        return isLoading;
    }

    public String getMessage() {
        return message;
    }

    public String getButtonText() {
        return buttonText;
    }

    public Component.ClickedListener getClickListener() {
        return buttonClickListener;
    }
}
